<!DOCTYPE html>
<html lang="zh">
<head>
<!--    引入jquery-->
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
<!--    引入jquery.form.js-->
    <script type="text/javascript" src="http://malsup.github.io/jquery.form.js"></script>
    <link rel="script" href="js/main.js">
    <meta charset="UTF-8">
    <title>阿贾克斯测试</title>
</head>
<body>
<form method="post" action="js/main.js" id="testFrom" >
    输入用户名：<input type="text" id="uname" name="uname"><br>
<!--                 onblur="a(this)"-->
    <input type="submit" value="普通提交"><br>
    <input type="button" value="jquery异步提交" id="ajax_S"><br>
</form>
<script src="js/main.js"></script>
<script>
    $("#ajax_S").on("click", function() {
        $("#testFrom").ajaxSubmit({
            success: function(data) {
                console.log("成功调用",data.message);

            }
        });
    });
</script>
</body>
</html>